<template>
	<view>
		<view class="tutor_a" :class="is_type==2?'tutor_aa':''" @click="goPage(item.id)" v-for="(item, index) in list">
			<view class="tutor_a_a">
				<view class="tutor_a_a_a">
					<view class="tutor_a_a_a_a">{{item.name}}</view>
					<view class="tutor_a_a_a_b">
						<view class="tutor_a_a_a_b_a" v-for="(item1, index1) in item.label">
							<span v-if="index1>0">|</span>{{item1}}
						</view>
					</view>
				</view>
				<view class="tutor_a_a_b">
					<u-rate :disabled="true" v-model="item.star" active-color="#FBC509" :size="16" />
				</view>
				<view class="tutor_a_a_c">从业<span>{{item.year}}</span>年 | 累计服务<span>{{item.service_num}}</span>学员</view>
			</view>
			<view class="tutor_a_b">
				<custom-image :lazy-load="true" width="140rpx" height="140rpx" radius="50%" lazy-load :src="item.image"></custom-image>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '@/common/request.js';
	export default {
		name:"TutorList",
		props: {
			list: {
				type: Array,
				default: () => []
			},
			is_type:{ //1首页 2列表
				type: Number,
				default:1
			},
		},
		data() {
			return {
				baseUrl_img:request.baseUrl_img,
			};
		},
		methods: {
			goPage(id) {
				uni.navigateTo({
					url:'/pages/tutor/info?id='+id
				});
			},
		}
	}
</script>
<style lang="scss" scoped>
	.tutor_a{
		width: 700rpx;
		height:auto;
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(210,210,210,0.34);
		border-radius: 20rpx;
		margin: auto;
		margin-bottom: 20rpx;
		padding: 50rpx;
		overflow: hidden;
	}
	.tutor_aa{
		background: linear-gradient(-57deg, #734FB5, #BC82BB);
	}
	.tutor_a_a{
		float: left;
		height: 140rpx;
	}
	.tutor_a_a_a{
		overflow: hidden;
	}
	.tutor_a_a_a_a{
		font-family: PingFang SC;
		font-weight: 800;
		font-size: 26rpx;
		color: #000000;
		line-height: 36rpx;
		float: left;
	}
	.tutor_aa .tutor_a_a_a_a{
		color: #fff;
	}
	.tutor_a_a_a_b{
		float: left;
		margin-left: 25rpx;
		overflow:hidden;
	}
	.tutor_a_a_a_b_a{
		float: left;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 22rpx;
		color: #999999;
		line-height: 36rpx;
	}
	.tutor_aa .tutor_a_a_a_b_a{
		color: #FFFFFF;
	}
	.tutor_a_a_a_b_a span{
		margin-left: 5rpx;
		margin-right: 5rpx;
	}
	.tutor_a_a_b{
		overflow: hidden;
		margin-top: 15rpx;
	}
	.tutor_a_a_c{
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 22rpx;
		color: #999999;
		margin-top: 20rpx;
	}
	.tutor_aa .tutor_a_a_c{
		color:#FFFFFF;
	}
	.tutor_a_a_c span{
		color:#FF6000;
		margin-left: 5rpx;
		margin-right: 5rpx;
	}
	.tutor_aa .tutor_a_a_c span{
		color:#FFFFFF;
	}
	.tutor_a_b{
		width: 140rpx;
		height: 140rpx;
		border-radius: 50%;
		float: right;
	}
</style>